import { COMMON_PARAMS } from './config'
import jsonp from 'common/js/jsonp'
import axios from "axios"

export function getLyric(mid) {
  const url = '/api/getLyric';

  const data = Object.assign({}, COMMON_PARAMS, {
    songmid: mid,
    pcachetime: +new Date(),
    g_tk: 5381
  })

  return axios.get(url, {
    params: data
  }).then((res) => {
    return Promise.resolve(res.data)
  })
}